{literal}
<script type="text/javascript">

var provinciasData="{/literal}<?php print getProvincias(); ?>{literal}";
var provinciasElija = "<option value=''> --- Provincia --- </option>";
jQuery(document).ready(function(){
	jQuery("#pais").change(function(){		
		if($("#pais").val()!=632){
			jQuery("#provincias").html(provinciasElija);
		}else{
			jQuery("#provincias").html(provinciasElija + provinciasData);
		}	
	 });	
	 	 
});

</script>
{/literal}
<h5 class="memberarea_caption">{$smarty.const.CHANGE_USER}</h5>
<div style="clear:both;height:12px;"></div>

{if $please_confirm}
	<p><b class='red'>{$smarty.const.LA_WARNING}</b><br />{$smarty.const.LA_DO_YOU_REAL}
	<br/><br /><a href="member_change.php?delete_me=1&confirmed=1"><b><u>{$smarty.const.LA_I_DO}</u></b></a>
	</p>
{/if}


{if $error_update}
	<p>{$error_update}</p>
{/if}

{if $user_deleted}
	<p>{$smarty.const.LA_USER_IS_DELETED}</p>
{/if}


{if $email_change==1 && $error_update==""}
	<p>{$smarty.const.LA_INFO_CHANGED}</p>
	
	{if $admin_Area}
		<p><a href='users.php'>Back to users</a></p>
	{/if}
{elseif $email_change !=1}
	<p>{$email_change}</p>
{/if}


<form method="post" action="{$phpself}" name="itemForm" id="itemForm" enctype='multipart/form-data' class="adm_member_form">
<input type="hidden" name="user_id" value="{$user_id}" />


<table width="100%" cellspacing="0">
<tr>
	<td valign="top" class="form_label">{$smarty.const.ADD_USER_NAME}<p /></td>
   	<td valign="top">
   		<input type="text" size="30" name="new_name" value="{$name}" />
   </td>
</tr>
<tr>
	<td valign="top" class="form_label">{$smarty.const.LA_MAILADDRESS}<p /></td>
   	<td valign="top">
   		<input type="text" size="30" name="new_email" value="{$email}" />
   </td>
</tr>

{if $IS_VENDOR}

<tr>
	<td valign="top" class="form_label">{$smarty.const.LA_VENDOR_IMAGE}<p /></td>
   	<td valign="top">
   	{if $vendor_url}
   		<img src="{$vendor_url}" width="30" alt="{$smarty.const.LA_VENDOR_IMAGE}" />
   		<a href="?del_vendor_image=1">{$smarty.const.LA_DEL}</a>
   	{else}	
		<input type='hidden' name='MAX_FILE_SIZE' value='10000000' />
		<input name='vendor_url' size="5" type='file' /> 		
   	{/if}		
   		
   		
   </td>
</tr>

<tr>
	<td valign="top" class="form_label">{$smarty.const.LA_VENDOR_HOMEPAGE}<p /></td>
   	<td valign="top">
   		<input type="text" name="vendor_homepage" size="50" value="{$vendor_homepage}" />
   </td>
</tr>
{/if}

{foreach item=e from=$extra_fields_array}

{if $e.q_catdescr}
	<tr><td colspan="2">
   		<b>{$e.q_catdescr}</b><hr style="color:black;" width="100%" align="left">
	</td></tr>
{/if}

<tr>
	<td valign="top" class="form_label">{$e.q_question} </td>
   	<td valign="top">
   	
   	{if $e.q_type=="t"}

		{if $e.q_question==$smarty.const.EF_USR_PROVINCIA}
		<input type="hidden" name="provinciaSeleccionada" value="{$e.q_value}" />
		<select name="e_{$e.q_field}" id="provincias">
						<option value=""> --- Provincia --- </option>
						{$provincias}
		</select>
		{else}
   		<input type="text" name="e_{$e.q_field}" size="{$e.q_size}" value="{$e.q_value}" class="{$e.q_css_class}" />
   		{/if}
	{elseif $e.q_type=="p"}

		<input type="text" name="e_{$e.q_field}" size="7" value="{$e.q_value}" class="{$e.q_css_class}"/> {$set_currency_text}
   	
   		
   	{elseif $e.q_type=="d"}

   		<textarea cols="{$e.q_size}" rows="{$e.q_size_2}" name="e_{$e.q_field}" class="{$e.q_css_class}">{$e.q_value}</textarea>
   		
   	{elseif $e.q_type=="c"}
   		{foreach item=opt from=$e.options}
   		<input type="checkbox" name="e_{$e.q_field}[]" id="{$e.q_field}" value="{$opt.value}" class="{$e.q_css_class}" {if $opt.selected_value} checked{/if}>
   			{$opt.text} <br />
   		{/foreach}

   	{elseif $e.q_type=="s"}
   		
   		{if $e.q_question==$smarty.const.EF_USR_PAIS}   			
   			<select name="e_{$e.q_field}" id="pais" class="txt">
		{else}		
   		<select name="e_{$e.q_field}" class="txt {$e.q_css_class}">
	   		{if $e.q_mand}
		   		<option value=''>--</option>
		   	{else}
		   		<option value='0'>{$smarty.const.LA_EMPTY}</option>
		   	{/if}
	   	{/if}   
   		{foreach item=opt from=$e.options}
   			<option value="{$opt.value}" {if $opt.selected_value} selected{/if}>{$opt.text|escape}</option>
   		{/foreach}
   		</select>
   		
   	{elseif $e.q_type=="r"}
   		
   		{foreach item=opt from=$e.options}
   			<input type="radio" name="e_{$e.q_field}[]" id="{$e.q_field}" value="{$opt.value}" class="{$e.q_css_class}" {if $opt.checked} checked{/if}>
   			{$opt.text} <br />
   		{/foreach}
   		
   		
   	{/if}
   	
	{if $e.q_mand}<span class="red">*</span>{/if}
   	
   </td>
</tr>

{/foreach}  



<tr>
	<td valign="top" class="form_label">{$smarty.const.LA_NEWS}</td>
   	<td valign="top">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top" align="left">
            
 <input type="checkbox" name="emelding" value="1" {if $recive_mail_yes} checked="checked" {/if} /></td>
            <td valign="top" align="left"><img border="0" src="layout_images/spacerbig.gif" width="3" height="3"><br>
		{$smarty.const.LA_NO_EMAIL_PLEASE}</td>
          </tr>
          <tr>
            <td valign="top" align="left">
<input type="checkbox" name="hide_email" value="1" {if $hide_email_yes} checked="checked" {/if} /></td>
            <td valign="top" align="left"><img border="0" src="layout_images/spacerbig.gif" width="3" height="3"><br>
       	{$smarty.const.LA_HIDE_EMAIL}</td>
          </tr>
        </table>
       	
   </td>
</tr>
</table>

<input type="submit" name="submit" value="{$smarty.const.LA_SAVE}" class="button" />
</form>


{if !$admin_Area}
	<center><a href='member_change.php?delete_me=1' class="lnk_borrar_cuenta">{$smarty.const.LA_DELETE_ME}</a></center>
{/if}
